package com.wendy.mongo.service;

import cn.hutool.core.util.ReflectUtil;
import com.anwen.mongo.mapper.BaseMapper;
import com.anwen.mongo.service.IService;
import com.anwen.mongo.service.impl.ServiceImpl;
import com.wendy.common.core.utils.reflect.ObjectUtils;

public class BaseMongoPlusService<MAPPER extends BaseMapper,ENTITY,VO>
        extends ServiceImpl<ENTITY> implements IService<ENTITY> {


    protected    Class<VO> currentVoClass() {
        return (Class<VO>) ObjectUtils.getByGenericByIndex(this.getClass(), BaseMongoPlusService.class, 2);
    }

    protected Class<ENTITY> currentModelClass() {
        return (Class<ENTITY>) ObjectUtils.getByGenericByIndex(this.getClass(), BaseMongoPlusService.class, 1);
    }


}
